package fy.erp.operator;

import com.seeyon.v3x.services.flow.bean.FlowExport;
import com.seeyon.v3x.services.form.bean.ValueExport;
import fy.erp.dao.FYELingLiaoDao;
import fy.form.listen.operate.AForm_Save_Operator;

public class FYELingLiaoFormOperatorImpl
        extends AForm_Save_Operator
{
    private static final String FORMNAME = "领料发料单";
    private String erpNumber;

    public void operate(long summaryID, long userID)
            throws Exception
    {
        super.operate(summaryID, userID);
    }

    public String getFormName()
    {
        return "领料发料单";
    }

    public void setFlowStatus(short flowStatus)
    {
        this.flowStatus = flowStatus;
    }

    protected void parseOtherField_FirstStep(FlowExport flowExport) {}

    protected void parseValueExport(ValueExport ve)
    {
        if ("ERP单据编号".equals(ve.getDisplayName())) {
            this.erpNumber = ve.getValue();
        }
    }

    protected boolean save()
    {
        return FYELingLiaoDao.save(this.erpNumber, this.flowStatus);
    }
}
